package com.springcloud.configclient.product.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description
 * @Author xuan
 * @Date 2020/12/3 10:46
 * @Version 1.0
 */
@RestController
public class HelloController {


    @RequestMapping("/hello")
    public String hello(@RequestParam String name) {
        return "hello "+name+"，producer 2 is ready";
    }


    @RequestMapping("/hi/happy")
    public String happy(@RequestParam String msg) {
        return "hi "+msg+"，producer2 happy is ready";
    }


    /**
     * https://www.cnblogs.com/babycomeon/p/11167514.html
     * @param foo
     * @return
     */
    @RequestMapping("/foo")
    public String foo(String foo) {
        return "hello "+foo+"!";
    }
}

